package com.aaron.study.common.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import feign.Contract;
import feign.auth.BasicAuthRequestInterceptor;

/**
 * 自定义feign配置 <br>
 * Date: 2018/1/23 <br>
 * Time: 23:05 <br>
 * <p>
 * <a href="https://gitee.com/aaronsd/spring-cloud-security/">spring-cloud-security</a>
 *
 * @author <a href="mailto:610195979@qq.com?subject=com.aaron.study.spring-cloud-security">aaron</a>
 * @version 0.0.1
 */
@Configuration
public class CustomerFeignConfig {

	@Bean
	public Contract feignContract() {
		return new Contract.Default();
	}

	@Bean
	public BasicAuthRequestInterceptor basicAuthRequestInterceptor() {
		return new BasicAuthRequestInterceptor("guest", "guest");
	}
}
